﻿@model PagedList<LTSMZ.life.Model.FirstType>
           @using Webdiyer.WebControls.Mvc

@{
    ViewBag.Title = "FirsType_Show";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<link href="~/Content/BootstrapSouce/css/bootstrap.min.css" rel="stylesheet" />
<script src="~/Content/BootstrapSouce/js/jquery.min.js"></script>
<script src="~/Content/BootstrapSouce/js/bootstrap.min.js"></script>


<button class="btn btn-lg btn-info" onclick="Add()"><span class="glyphicon glyphicon-plus">添加</span></button>

<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">
           一级类别添加
        </h3>
    </div>
    <div class="panel-body">
        <table class="table table-bordered table-hover" id="table1">
            <tr>
                <td>编号</td>
                <td>类别名称</td>
                <td>操作</td>
            </tr>
            @foreach (var i in Model)
            {
                <tr>
                    <td>@i.Fid</td>
                    <td>@i.Fname</td>
                    <td><a style="text-decoration:none" href="/Home/SecondTypeShow/@i.Fid" class="glyphicon glyphicon-list-alt"></a>&nbsp;&nbsp;<a style="text-decoration:none" href="/Home/UptFirstype/@i.Fid" class="glyphicon glyphicon-edit"></a>&nbsp;&nbsp;<a style="text-decoration:none" href="/Home/Del_FirsType/@i.Fid" onclick="return confirm('确定要删除吗？')" class="glyphicon glyphicon-trash"></a></td>
                </tr>
            }
        </table>
    </div>
</div>
@Html.Pager(Model, new PagerOptions { PageIndexParameterName = "pageIndex" })
<script>
    function Add() {
        location.href = '/Home/AddFirstype';
    }
</script>
@*Mvc Page 插件样式（未完成）*@
@*<table>
    <tr>
        <td colspan="5">
            <ul class="sanjhb_page">
                @section Scripts{@{Html.RegisterMvcPagerScriptResource();}}
                @Html.Pager(Model, new PagerOptions
               {
                   PageIndexParameterName = "pageIndex",
                   //ShowPageIndexBox = true
               })
            </ul>
        </td>
    </tr>
</table>*@
@*Mvc Page 插件样式（未完成）*@
@*<div class="text-center">
    <nav>
        @Html.Pager(Model, new PagerOptions { PageIndexParameterName = "id", ContainerTagName = "ul", CssClass = "pagination", CurrentPagerItemTemplate = "<li class=\"active\"><a href=\"#\">{0}</a></li>", DisabledPagerItemTemplate = "<li class=\"disabled\"><a>{0}</a></li>", PagerItemTemplate = "<li>{0}</li>", Id = "bootstrappager" })
    </nav>
</div>*@

